/**
 * 
 */
package cyclopean.world;

// TODO Javadoc
/**
 * 
 *
 * @author Jaco van der Westhuizen
 */
class Actor
{
	public static class Position
	{
    	Zone zone;
    	float x;
    	float y;
    	float z;
    	// TODO Direction
    	
    	public void move(float dx, float dy, float dz)
    	{
    		// TODO Check for portals
    		x += dx;
    		y += dy;
    		z += dz;
    	}
	}

	final Position pos;
	
	Actor(Position pos)
	{
		this.pos = new Position();
		this.pos.zone = pos.zone;
		this.pos.x = pos.x;
		this.pos.y = pos.y;
		this.pos.z = pos.z;
	}

	Actor(Zone zone, float x, float y, float z)
	{
		if (zone != null)
		{
			this.pos = new Position();
    		this.pos.zone = zone;
    		this.pos.x = x;
    		this.pos.y = y;
    		this.pos.z = z;
		}
		else
		{
			this.pos = World.convertAbsolutePos(x, y, z);
		}
	}

	/**
     * @return
     */
    public Position getPosition()
    {
	    return pos;
    }

}
